Introduction:

Police offices across the United States have enlisted in National Justice Database, the first and biggest assortment of normalized police social information. A dataset was derived from the National Justice Database with the data from Dallas, Texas in 2016. So, this project gave an idea of the data of policing behavior, especially with the help of data visualization. The dataset consisted of 2383 entries with 39 unique variables. Mainly the analysis is done to find out the problem of racism in policing using different visualization techniques. Many factors that drive racial disparities can be found in this dataset, but we are going to pick some of the major reasons behind the problem.

##Method: Data were preprocessed, cleaned, and with the RStudio and some of its visualizations power like(bar chart,pie chart, box plot,time series) data was analyzed.Also using ggplotly the plots were made interactive.

##Data Preprocessing: This data set had a lot of missing values. So, the first challenge was to clean the data set. At the top, there were two header rows and 2nd row was removed at the beginning. After that, those missing values were filled with null values. Columns with most of the null values do not affect or give an error in most of the cases so columns with missing values over 60 percent were dropped after that.

##Result

##Number of male and female in Police A simple bar chart shows that there is a huge difference between male and female officers. In Dallas, Texas most of the Officers are male. There are 2383 total officers in Dallas, among them 240 is female officers and 2143 is a male officer. So from the bar chart, we can say that female officers is less almost 10% percent in Dallas

##Officer Race By using a pie chart and a bar chart we can say that we have six types of Officers. In the department, they have the white majority with the number 1470 and American Indians have only 8 people in the department. After white, 482 Hispanic people were in the second position. Also only 341 black, 55 Asians , and 27 others were in the police department.white is actually 61.69% percent in the police department which cleary shows that there is white supremacy in the police recruitment process.

officer years on police

Using a density graph, we see that there is a huge number of people serving within the range of 0 to 5 years of experience. Then the number began to drop. But surprisingly the number increases with people doing job near 10 years. But the number of people with experiences over 15 years is significantly less.

By using a box plot, we see that officers with times tends to get injured and the numbers are more than uninjured with a median of 7.50 .They get injured mostly from 2 to 13 years.

##SUBJECT_RACE Using a bar chart, it Is clear that black is the biggest suspect race in Dallas. Almost half of the chart with 55.94 percent, 1333 people were black in the subject race. But after that Hispanic people were in 2nd position with a percentage of 21.99% percent. Asian people were suspected only 5 times.

##RACE analysis

Form the heatmap we can see that the number of white people deal with subject race black is the most. Almost 846 people were here. And black people arrested white people only 57 times .

## `summarise()` has grouped output by 'SUBJECT_RACE'. You can override using the
## `.groups` argument.

##Race analysis Here in hour analysis Peaks were noticed between 17:00 and 20:00, when a large number of occurrences were reported, followed by 02:00, when approximately 150 instances were reported. The lowest was observed at 7:00 a.m.Also in 2016 march was the month where most of the crimes were recorded and December came to the lowest point.

##incedent by by time

## `summarise()` has grouped output by 'INCIDENT_DATE', 'INCIDENT_MONTH'. You can
## override using the `.groups` argument.
## `summarise()` has grouped output by 'INCIDENT_DAY'. You can override using the
## `.groups` argument.

MAP: From the map we can see that number of arrest in incident reason is the hihgest and we can see were the incidents happen, looks like it is the central part were most of the arrest happend.

## Warning in colorFactor(palette = "Spectral", levels =
## data_final$INCIDENT_REASON): Duplicate levels detected
## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Spectral is 11
## Returning the palette you asked for with that many colors
## Warning in validateCoords(lng, lat, funcName): Data contains 55 rows with either
## missing or invalid lat/lon values and will be ignored
## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Spectral is 11
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(max(3, n), palette): n too large, allowed maximum for palette Spectral is 11
## Returning the palette you asked for with that many colors

Discussion

In the end we can say that there were a significant number of male police officer in Dallas. Also white people are the most in numbers they have arrested the black people most.The number of incident happend most in march and went down near to hundred in December. Also incident report were most in between 17.00 to 20.00.Also from the map we can see the places of diffrect incident reasons.